#ifndef SESSADT_H_
#define SESSADT_H_

/*--------------------------------------------------------------------------*/

#define SESS_FIFO	1
#define SESS_MSG	2
#define SESS_TCP	3
#define SESS_SHM	4


/*--------------------------------------------------------------------------*/

typedef struct sessCDT * sessADT;

typedef struct
{
	char line[255];
} messageT;

/*--------------------------------------------------------------------------*/

int initSessServer(int type, const void *dest, sessADT *sess);

int initSessClient(int type, const void *dest, sessADT *sess);

int listenSess(sessADT sess, sessADT *new);

int closeSess(sessADT sess);

int sendMsg(sessADT sess, void * msg, int len);

int getMsg(sessADT sess, void * msg, int len, int timeO);

int sendAns(sessADT sess, void * num, int len);

int getAns(sessADT sess, void * num, int len, int timeO);

/*--------------------------------------------------------------------------*/

#endif /*SESSADT_H_*/

